<?	session_start(); 
	if(isset($_SESSION['id']) & isset($_SESSION['pass']))
	{
	require("koneksi.php");
	$nrp=$_GET["nrp"];
	$query=mysql_query("select * from biodata where nrp='$nrp'");
	$row=mysql_fetch_row($query);
	$query2=mysql_query("select * from security where username='$nrp'");
	$row2=mysql_fetch_row($query2);
?>	

<form name="" method="POST" action="edit_mhs.php">
	<table>
		<tr>
			<td colspan="3">Menu Edit Mahasiswa</td>
		</tr>
		<tr>
			<td>NRP</td>
			<td>:</td>
			<td><input name="nrp" type="text" value="<? echo "$row[0]"?>"></td>
		</tr>
		<tr>
			<td>Nama</td>
			<td>:</td>
			<td><input name="nama" type="text" value="<? echo "$row[1]"?> "></td>
		</tr>
		<tr>
			<td>Password</td>
			<td>:</td>
			<td><input name="pass" type="text" value="<? echo "$row2[1]"?>" ></td>
		</tr>
		<tr>
			<td colspan="2"><input name="simpan" type="submit" id="simpan" value="Save"></td>
			<td><input name="reset" type="reset" id="reset" value="Reset"></td>
		</tr>
		
	</table>
	<a href="menu_mahasiswa.php">Back To Menu Mahasiswa</a>
	<br>
	<a href="menu_admin.php">Back to Menu Admin</a>
</form>
<? 
	}
	else
	echo "Silahkan <a href='index.php'>Login</a> dulu.";
?>
